document.addEventListener("DOMContentLoaded", function () {
    // Get the current page URL
    const currentPage = window.location.pathname.split("/").pop();

    // Get all the links in the navbar
    const navLinks = document.querySelectorAll(".navbar a");

    // Loop through the links and add the 'active' class to the current page's link
    navLinks.forEach(link => {
        if (link.getAttribute("href") === currentPage) {
            link.classList.add("active");
        }
    });
}); 